Skip to content

fix: Cloud Run 배포 시 무한 리디렉션 문제 해결#49

Merged
choubung merged 1 commit intomasterfrom
hot-fix/ver1-2
Nov 18, 2025
Merged

fix: Cloud Run 배포 시 무한 리디렉션 문제 해결#49
choubung merged 1 commit intomasterfrom
hot-fix/ver1-2

Conversation

@choubung
Copy link
Copy Markdown
Owner

@choubung choubung commented Nov 18, 2025

  • SecurityConfig에서 prod 프로필용 requiresSecure() 설정 제거
  • Cloud Run의 TLS Termination으로 인한 HTTP/HTTPS 리디렉션 루프 방지
  • HTTPS 처리는 Cloud Run 로드밸런서에 위임

Summary by CodeRabbit

릴리스 노트

  • 리팩토링

    • 보안 필터 설정을 통합하여 설정 복잡도를 감소시켰습니다.
    • 환경별 보안 정책 분기를 제거하고 단일 보안 체인으로 통합했습니다.
  • 기타

    • 데이터베이스 연결 설정을 업데이트했습니다.

- SecurityConfig에서 prod 프로필용 requiresSecure() 설정 제거
- Cloud Run의 TLS Termination으로 인한 HTTP/HTTPS 리디렉션 루프 방지
- HTTPS 처리는 Cloud Run 로드밸런서에 위임
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Nov 18, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

GitHub Actions 워크플로우에서 데이터베이스 JDBC URL의 호스트를 변경했고, 보안 설정에서 환경별 SecurityFilterChain 빈을 단일 메서드로 통합했으며 @Profile 어노테이션과 환경 특화 채널 요구사항을 제거했습니다.

Changes

Cohort / File(s) Summary
Database Configuration
.github/workflows/cd.yml
DB_URL 환경 변수의 JDBC 호스트를 "google"에서 빈 호스트로 변경 (jdbc:mysql:///mydb?...)
Security Configuration Consolidation
src/main/java/com/precourse/openMission/config/auth/SecurityConfig.java
환경별 SecurityFilterChain 빈(prodFilterChain, devFilterChain)을 단일 filterChain() 메서드로 통합; @Profile 어노테이션 및 requiresSecure 요구사항 제거; 헬퍼 메서드 commonSecurityConfig() 제거 및 로직 인라인화

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • SecurityConfig.java: 빈 통합 및 메서드 제거의 일관성 확인 필요
  • .github/workflows/cd.yml: 데이터베이스 연결 문자열 변경이 의도된 것인지, 다른 환경 설정과의 호환성 확인 필요

Possibly related PRs

Suggested labels

🛠 Refactor

Poem

🐰 프로필 걷어내고 체인 하나로 모아,
데이터베이스 호스트도 정리하고 보아,
간결함 속에 강함 숨어 있네,
단순한 설정이 최고의 매력이라네! 🌟

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch hot-fix/ver1-2

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3147271 and 1ff477d.

📒 Files selected for processing (2)
  • .github/workflows/cd.yml (1 hunks)
  • src/main/java/com/precourse/openMission/config/auth/SecurityConfig.java (2 hunks)

Comment @coderabbitai help to get the list of available commands and usage tips.

@choubung choubung merged commit c6c2dfd into master Nov 18, 2025
1 check was pending
@choubung choubung deleted the hot-fix/ver1-2 branch November 18, 2025 09:32
@choubung choubung self-assigned this Nov 19, 2025
@choubung choubung added 🚨 bug Something isn't working 👩‍🔧 CI/CD labels Nov 19, 2025
@choubung choubung added this to the 2️⃣ 배포 milestone Nov 19, 2025
@choubung choubung linked an issue Nov 19, 2025 that may be closed by this pull request
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚨 bug Something isn't working 👩‍🔧 CI/CD

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

CI/CD: 배포

1 participant